<link href="__CDN__/assets/addons/baiduwebtongji/css/main.css?v={$site.version}" rel="stylesheet">
<div class="row">
    <div class="col-sm-12">
        <div class="box box-success">
            <div class="panel-heading">
                <label>搜索词排名</label>
            </div>
            <div class="panel-body">
                <div class="btn-group btn-group-sm" role="group">
                    <button type="button" class="btn btn-default ajax-page" id="time_tody" data-memo="tody">今天</button>
                    <button type="button" class="btn btn-default ajax-page" id="time_yest" data-memo="yest">昨天</button>
                    <button type="button" class="btn btn-default ajax-page" id="time_week" data-memo="week">最近7天</button>
                    <button type="button" class="btn btn-default ajax-page" id="time_month" data-memo="month">最近30天</button>

                </div>
                <button type="button" class="btn btn-sm btn-success pull-right" id="get-words">同步</button>
                <button style="margin-right: 10px;" type="button" class="btn btn-sm btn-success pull-right" id="set-words">设置</button>
                <div class="section" id="ReportDiagram">
                    {if $keywords}
                    <ul>
                    {volist name="$keywords" id="vo"}
                        <li class="line">
                            <div class="word-stats">
                                <div class="word-header">
                                    <div class="row-number">{$key+1}</div>
                                    <div class="searchword">{$vo}</div>
                                </div>
                                <div class="index-info">
                                    <div class="index-line current">
                                        <label>搜索词排名：</label>
                                        <span class="index-value ellipsis" id="searchword_rank_{$key}">--</span>
                                    </div>
                                    <div class="index-line">
                                        <label>百度指数：</label>
                                        <span class="index-value ellipsis" id="baiduindex_{$key}">--</span>
                                    </div>
                                    <div class="index-line">
                                        <label>浏览量(PV)：</label>
                                        <span class="index-value ellipsis" id="pv_count_{$key}">--</span>
                                    </div>
                                    <div class="index-line">
                                        <label>访客数(UV)：</label>
                                        <span id="visitor_count_{$key}">--</span>
                                    </div>
                                    <div class="index-line">
                                        <label>跳出率：</label>
                                        <span class="index-value ellipsis" id="bounce_ratio_{$key}">--</span>
                                    </div>
                                    <div class="index-line">
                                        <label>平均访问时长：</label>
                                        <span class="index-value ellipsis" id="avg_visit_time_{$key}">--</span>
                                    </div>
                                </div>
                            </div>
                            <div class="flash-line-container">
                                <div class="echarts-rank" id="chart-rank{$key}" style="height:256px;width: 100%;text-align: center;">
                                    <span style="line-height: 256px;"><strong>{$vo}</strong> 搜索词的数据信息正在获取，请稍后…</span>
                                </div>
                            </div>
                        </li>
                    {/volist}
                    </ul>
                    {else/}
                        <p>暂无数据，若已在百度统计官方后台设置关键词请点击同步按钮，若尚未设置请点击设置按钮添加关键词。</p>
                    {/if}
                </div>
            </div>
        </div>      
    </div>
</div>
<script src="__CDN__/assets/addons/baiduwebtongji/js/echarts-all.js"></script>
<script>
    var url='{:url("baiduwebtongji/baiduapi/rankGetData")}';
    var getwords_url='{:url("baiduwebtongji/baiduapi/rankGetWords")}';
    var setwords_url='{:url("baiduwebtongji/baiduapi/rankSetWords")}';
    var keywords_str="{$keywords_str}";
    var bdtj_show="{$bdtj_show}";
</script>